home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 48
/
Amiga Format CD48 (1999-12-13)(Future Publishing)(GB)(Track 1 of 2)[!][issue 2000-01].iso
/
-in_the_mag-
/
networking
/
crosspc
/
spooler
/
spooler.doc
< prev
next >
Wrap
Text File
|
1999-11-08
|
5KB
|
175 lines
Spooler V1.0 Written by Jeff Crystal © 1998
1. Introduction (or What the heck is it?)
Spooler is a simple utility that watches a directory for new files and
then sends them to a network printer via Samba, the Unix file and printer
sharering protocol. Samba clients exist for many operating systems, such
as Netware, OS/2, Windows for Workgroups, WindowsNT and Windows 95/98.
The Windows 95/98 client is otherwise know as Client for Microsoft Networks.
Spooler allow you to print to a printer connected to a Windows 95 machine
anywhere on the internet or your local network, for example.
2. Requirements
First and foremost, you must have installed Samba, as well as AmiTCP
(or any other AmiTCP compatible TCP/IP stack, such as Miami.) You must have
a working network connection between your amiga and the server machine that
is sharing the printer you want to connect to. I recomend using an ethernet
connection for speed reasons, but a modem connect will work fine to. You also
must have smbclient (comes with samba) installed somewhere in your path.
3. How does it work?
Spooler relies on the standard utility CMD to capture your printer's
output to a file. Spooler runs in the background and once about every 10
seconds or so will examine the spool directory for files. As it encounters
a file, if it can get an exclusive lock on the file (i.e. CMD is not still
writing to it,) it will call smbclient to ship the file off to the remote
printer, then delete the file. Once it finishes all files in the directory
it waits another 10 seconds and starts over. Spooler does not currently have
any way to quit running. If you'd like to have a quit command for it, send
me an email and I may include that in a future version with enough demand.
4. Installation
First add the following line to your s:user-startup file:
Assign SpoolDir: Work:SpoolFiles ; Replace with any path you like
Next, move or copy CMD from your Tools directory to your WBStartup directory,
and edit it's tooltypes. The following values are what I use:
DEVICE=parallel
FILE=SpoolDir:PrintFile
SKIP=FALSE
MULTIPLE=TRUE
NOTIFY=FALSE
if you have a printer attached to your parallel port already, you could use
DEVICE=serial instead for the network printer. Next, copy spooler and smbclient
(from the samba/bin directory) into your C: directory. (Spooler explicitly
looks for these files in C:)
Now each time you print, the output will be captured to a file in your
spool directory. To send it to the remote printer automatically, add the
following line to the end of your amitcp:db/user-startnet file:
run <nil: >nil: spooler <printer_path> [SpoolDir]
replace <printer_path> with the machine name and printer name you want to
print to, for example, to print to a printer named HP6L on a windows 95
machine named Keith, printer_path would be \\keith\hp6l. (Note that path names
are not case sensitive.) If you assigned SpoolDir: as instructed above,
[SpoolDir] is not needed. If you'd like to use something other that SpoolDir:
then file in [SpoolDir] with any path you would like. It *MUST* end in
either : or / for spooler to work! Spooler only runs from the CLI.
Spooler also accepts the debuging command -d as a parameter. If included,
Spooler outputs to the file RAM:Spooler.out debug information.
5. Notes
Don't forget that you must pick a printer driver from prefs that is
compatible with the printer you want to use. Spooler is simply redirecting
the raw output of your printer.device over the network.
spooler and smbclient (from the samba/bin directory) MUST be copied to
your C: directory.
I have successfully tested this program with Samba v1.9.16p9 and an HP
Laserjet printer shared by a Windows 95 machine.
Spooler is Freeware, so use and enjoy. But remember that you get what
you pay for! The author makes no claims that this software will work on
any system but his own. Use this software at your own risk. This software
carries No Warranty of any kind, Express or Implied.
6. Troubleshooting
Be sure that smbclient is in C:.
RAM: must be accessable if you intend to use the debugging feature (-d)
Make sure that you can ping the server machine.
Try listing shared services with smbclient (i.e. smbclient -L <machine_name>)
if you can list the services, you should be able to use them.
Make sure that the printer has no password! Spooler does not yet support
sending passwords.
If all else fails, read the Samba documentation (RTFM!!)
6. Bugs
None Known. If you find one, let me know!
6. Contacting the Author
Constructive comments, Feature Requests, etc.
Email
darkmagi@freeway.net
Flames, Abuse, and similar please send to:
Email
bgates@microsoft.com